﻿<Window x:Class="Principle20_20_20.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:ignore="http://www.ignore.com"
        mc:Ignorable="d ignore"
        Height="464"
        Width="606"
        Title="Principle-20-20-20 Eye Strain Relief"
        WindowStyle="None"
        WindowStartupLocation="CenterScreen"
        xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
        xmlns:Custom="http://schemas.microsoft.com/expression/2010/interactivity"
        DataContext="{Binding Main, Source={StaticResource Locator}}">
    <Window.Background>
        <ImageBrush ImageSource="/Principle20-20-20;component/Resources/AppImage.png" />
    </Window.Background>
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Skins/MainSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid x:Name="LayoutRoot" Height="404" Width="533" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
        <Grid.Resources>
            <ControlTemplate x:Key="HyperlinkLikeLabelTemplate" TargetType="{x:Type Button}">
                <Label   Foreground="{DynamicResource {x:Static SystemColors.HotTrackBrushKey}}" Cursor="Hand">
                    <TextBlock x:Name="innerText" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, Mode=OneWay}"></TextBlock>
                </Label>
                <ControlTemplate.Triggers>
                    <Trigger  Property="TextBox.IsMouseOver" Value="true">
                        <Setter TargetName="innerText" Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
                        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
            
            <Style TargetType="TextBlock" x:Key="DefTextStyle">
                <Setter Property="Height" Value="50"/>
                <Setter Property="FontFamily" Value="Arial"/>
                <Setter Property="FontSize" Value="30"/>
                <Setter Property="FontWeight" Value="Bold"/>
                <Setter Property="Foreground" Value="#FF838182"/>
                <Setter Property="HorizontalAlignment" Value="Left"/>
                <Setter Property="VerticalAlignment" Value="Top"/>
                <Setter Property="Width" Value="35"/>
                <Setter Property="Height" Value="37"/>
            </Style>

            <Style x:Key="CaptionTextStyle" TargetType="TextBlock" BasedOn="{StaticResource DefTextStyle}">
                <Setter Property="FontSize" Value="15"/>
                <Setter Property="Foreground" Value="Gray"/>                
            </Style>

            <Style x:Key="TitleTextStyle" TargetType="TextBlock" BasedOn="{StaticResource DefTextStyle}">
                <Setter Property="FontSize" Value="18"/>
                <Setter Property="Foreground" Value="Gray"/>                
                <Setter Property="LayoutTransform">
                    <Setter.Value>
                        <RotateTransform Angle="-90"></RotateTransform>
                    </Setter.Value>
                </Setter>
            </Style>
            
        </Grid.Resources>
        <TextBlock Margin="236,273,0,0" Name="txtSeconds" Text="{Binding Path=CurrentTimeSpan}" Style="{StaticResource DefTextStyle}"/>
        <Button Content="Start" Height="23" HorizontalAlignment="Left" Margin="213,316,0,0" Name="btnStart" VerticalAlignment="Top" Width="85">
            <Custom:Interaction.Triggers>
                <Custom:EventTrigger EventName="Click">
                    <GalaSoft_MvvmLight_Command:EventToCommand x:Name="StartButtonClicked" Command="{Binding StartCommand, Mode=OneWay}"  />
                </Custom:EventTrigger>
            </Custom:Interaction.Triggers>
        </Button>
        <Button Content="Dismiss for now" Height="25" HorizontalAlignment="Left" Margin="419,364,0,0" Name="btnDismiss" Template="{StaticResource HyperlinkLikeLabelTemplate}" VerticalAlignment="Top" Width="100">
            <Custom:Interaction.Triggers>
                <Custom:EventTrigger EventName="Click">
                    <GalaSoft_MvvmLight_Command:EventToCommand x:Name="DismissButtonClicked" Command="{Binding DismissCommand, Mode=OneWay}" />
                </Custom:EventTrigger>
            </Custom:Interaction.Triggers>
        </Button>
        <Button Content="Quit" Height="25" HorizontalAlignment="Left" Margin="12,379,0,0" Name="btnQuit" Template="{StaticResource HyperlinkLikeLabelTemplate}" VerticalAlignment="Top" Width="53">
            <Custom:Interaction.Triggers>
                <Custom:EventTrigger EventName="Click">
                    <GalaSoft_MvvmLight_Command:EventToCommand x:Name="QuitButtonClicked" Command="{Binding QuitCommand, Mode=OneWay}" />
                </Custom:EventTrigger>
            </Custom:Interaction.Triggers>
        </Button>
        <Button Content="Tell me more" Height="23" HorizontalAlignment="Left" Margin="13,349,0,0" Name="btnTellMe" Template="{StaticResource HyperlinkLikeLabelTemplate}" VerticalAlignment="Top" Width="89">
            <Custom:Interaction.Triggers>
                <Custom:EventTrigger EventName="Click">
                    <GalaSoft_MvvmLight_Command:EventToCommand x:Name="TellMeButtonClicked" Command="{Binding TellMeCommand, Mode=OneWay}" />
                </Custom:EventTrigger>
            </Custom:Interaction.Triggers>
        </Button>
        <TextBlock Margin="373,4,0,0" Name="txtCaption" Style="{StaticResource CaptionTextStyle}" Text="Eye Strain Relief Tool" Height="20" Width="160" />
        <TextBlock Margin="6,7,0,0" Name="txtTitle" Style="{StaticResource TitleTextStyle}" Text="Principle 20-20-20" Height="42" Width="157" />
    </Grid>
</Window>
